/*
 * Name: $RCSfile: ParameterFactory.java,v $
 * Version: $Revision: 1.1 $
 * Date: $Date: Oct 31, 2011 2:45:36 PM $
 *
 * Copyright (C) 2011 COMPANY_NAME, Inc. All rights reserved.
 */

package hoang.hut.app.network;

import hoang.hut.app.info.WebserviceConfig;

import java.util.ArrayList;
import java.util.List;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

/**
 * ParameterFactory class builds parameters for web service apis
 * 
 * @author Hai Le
 */
public final class ParameterFactory
{
    /**
     * Create token parameters
     * 
     * @param token
     * @return
     */
    public static List<NameValuePair> createTokenParams(String token)
    {
        List<NameValuePair> parameters = new ArrayList<NameValuePair>();
        parameters.add(new BasicNameValuePair(WebserviceConfig.PARAM_TOKEN,
            token));
        return parameters;
    }

    /**
     * Create token message parameters
     * 
     * @param token
     * @param messageId
     * @return
     */
    public static List<NameValuePair> createTokenMessageParams(String token,
        String messageId)
    {
        List<NameValuePair> parameters = new ArrayList<NameValuePair>();
        parameters.add(new BasicNameValuePair(WebserviceConfig.PARAM_TOKEN,
            token));
        parameters.add(new BasicNameValuePair(
        		WebserviceConfig.PARAM_PERSONAL_MESSAGE_ID, messageId));
        return parameters;
    }

}
